package live.yanxiaohui.deadletter.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description todo
 * @CSDN https://blog.csdn.net/yxh13521338301
 * @Author： yanxh<br>
 * @Date 2020-06-29 10:00<br>
 * @Version 1.0<br>
 */
@Component
public class DeadLetterConsumer {

    @RabbitListener(queues = "yxh_order_dlx_queue")
    @RabbitHandler
    public void handle(String msg) throws Exception {
        System.out.println("死信消费：" + msg);
        int i = 1/0;
    }
}
